﻿using UnityEngine;
using System.Collections;
using CHFramework;
using UnityEngine.UI;

public class UIInGamePanel : BaseUI
{
    public GameObject PauseBtn;

	private void Awake () 
	{
        base.CurrentUIType.PanelType = UIPanelType.Normal;
        base.CurrentUIType.ShowMode = UIPanelShowMode.HideOther;

        EventTriggerListener.Get(PauseBtn).onClick = OnEnterPause;
	}

    /// <summary>
    /// 打开暂停
    /// </summary>
    /// <param name="sender"></param>
    private void OnEnterPause(GameObject sender)
    {
        Time.timeScale = 0;
        UIManager.Instance.ShowUIPanel(EnumPanel.UIPausePanel);
    }
}
